import { createRouter, createWebHashHistory } from "vue-router";
import RouterHaiKang from "./routes/router-haikang";
import RouterStudy from "./routes/router-study";
import RouterMsg from './routes/router-msg'
import RouterCommon from './routes/router-common'
import RouterFunction from './routes/router-function'
import RouterData from './routes/router-data'
import RouterMap from './routes/router-map'
import RouterAccount from './routes/router-account'
import RouterProcess from './routes/router-process'
import RouterWelcome from './routes/router-welcome'
import RouterThings from './routes/router-things'
import routerUser from "./routes/router-user";

const constantRouter = [
    ...RouterWelcome,
    ...RouterCommon,
    ...routerUser,
    ...RouterAccount,
    ...RouterFunction,
    ...RouterData,
    ...RouterThings,
    ...RouterMsg,
    ...RouterProcess,
    ...RouterStudy,
    ...RouterHaiKang,
    ...RouterMap,
    {
        path: '/study/study-index',
        meta: { title: '首页模板' },
        component: () => import('@/views/study/study-index')
    },
    {
        path: '/:pathMatch(.*)',
        redirect: '/welcome',
        meta: {
            menuTag: false
        }
    },
]

export default createRouter({
    history: createWebHashHistory(),
    routes: constantRouter
})
